#include "GameRound.h"

namespace Dicewars
{
	GameRound::GameRound()
	{
	}

	GameRound::~GameRound()
	{
	}
	
	void GameRound::Start(int duration)
	{
		startTime = time(0);
		roundDuration = duration;
		endTime = startTime + roundDuration;
	}
	
	void GameRound::AddTime(int seconds)
	{
		endTime += seconds;
	}
	
	const int GameRound::GetTimeLeft() const
	{
		return endTime - time(0);
	}

	void GameRound::Break()
	{
		endTime = 0;
	}
}
